Natural resources such as gas, oil, and water residing in a subterranean formation or zone are usually recovered by drilling a wellbore down to the subterranean formation and using and/or installing a variety of equipment thereon. Generally, the equipment associated with the wellbore is susceptible to corrosion, such as for example internal corrosion that may be due to produced fluids, external corrosion that may be due to equipment surfaces contacting formation fluids, etc. Thus, an ongoing need exists for more effective compositions and methods of preventing corrosion in wellbores and/or subterranean formations.